package rs.etf.es.visualization;

import java.awt.event.MouseEvent;

import rs.etf.es.algorithm.Node;
import edu.uci.ics.jung.visualization.control.GraphMouseListener;

public class VertexPicker implements GraphMouseListener<Node> {

    private MainWindow view;

    public VertexPicker(MainWindow mainWindow) {
	view = mainWindow;
    }

    @Override
    public void graphClicked(Node arg0, MouseEvent arg1) {

    }

    @Override
    public void graphPressed(Node arg0, MouseEvent arg1) {
	view.setTxtVariableName(arg0.getName());
	view.setTxtCPTDump(arg0.getStringCPT());
	view.setTxtLambdaPiVals(arg0.getStringLambdaPiValues());
	view.setTxtLambdaPiMsgs(arg0.getStringLambdaPiMessages());
	view.setTxtProbability(arg0.getStringProbabilities());
	Node.selectedNode = arg0;
    }

    @Override
    public void graphReleased(Node arg0, MouseEvent arg1) {

    }

}
